using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;

namespace Faster.GameUtility
{
   public class AMFMessage
   {
      #region Fields and Properties
      private UInt16 _version;
      private Collection<AMFHeader> _headers;
      private Collection<AMFBody> _bodies;
      private List<AMFResponse> _response;

      public List<AMFResponse> Response
      {
         get 
         { 
            if (_response == null)
            {
               _response = new List<AMFResponse>();
            }
            return _response;
         }
      }
      public UInt16 Version
      {
         get
         {
            return _version;
         }
         internal set
         {
            _version = value;
         }
      }
      public Collection<AMFHeader> Headers
      {
         get
         {
            if (_headers == null)
            {
               _headers = new Collection<AMFHeader>();
            }
            return _headers;
         }
      }
      public Collection<AMFBody> Bodies
      {
         get
         {
            if (_bodies == null)
            {
               _bodies = new Collection<AMFBody>();
            }
            return _bodies;
         }
      }
      #endregion
   }
}